package com.jmu.bishe.entity;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * News entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "NEWS", schema = "HUANG")
public class News implements java.io.Serializable {

	private static final long serialVersionUID = -8543826823999729202L;
	private String nid;
	private String content;
	private Date recordDate;
	private String title;
	private String userId;
	private String sourse;
	private int status;

	// Constructors
	public News() {
	}

	/** minimal constructor */
	public News(String nid) {
		this.nid = nid;
	}

	/** full constructor */
	public News(String nid, String content, Date recordDate, String title,
			String userId, String sourse , int status) {
		this.nid = nid;
		this.content = content;
		this.recordDate = recordDate;
		this.title = title;
		this.userId = userId;
		this.sourse = sourse;
		this.status = status;
	}

	

	// Property accessors
	@Id
	@Column(name = "NID", unique = true, nullable = false, length = 32)
	public String getNid() {
		return this.nid;
	}

	public void setNid(String nid) {
		this.nid = nid;
	}

	@Column(name = "CONTENT", length = 2048)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "RECORD_DATE", length = 7)
	public Date getRecordDate() {
		return this.recordDate;
	}

	public void setRecordDate(Date recordDate) {
		this.recordDate = recordDate;
	}

	@Column(name = "TITLE", length = 50)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "USER_ID", length = 20)
	public String getUserId() {
		return this.userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}
	@Column(name = "SOURSE", length = 20)
	/** default constructor */
	public String getSourse() {
		return sourse;
	}

	public void setSourse(String sourse) {
		this.sourse = sourse;
	}
	@Column(name = "STATUS", precision = 22, scale = 0)
	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

}